import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ObjCreate } from "../../common/ObjCreate";
import { GameDefConfig } from "../../../resource/GameDefConfig";
import { Language } from "../../../../../extend/language/Language";
import { LoaderManager } from "../../../../../com/gengine/resource/LoaderManager";
import { ImageInfo } from "../../../../../com/gengine/resource/info/ImageInfo";
//class FashionJewelToolTipsItem
    
    export  class FashionJewelToolTipsItem /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.initView();
            return;
        }

        /* internal  */initView(): void
        {
            var loc1=GlobalClass.getBitmap("HoleBg");
            loc1.x = 2;
            loc1.width = 24;
            loc1.height = 24;
            addChild(loc1);
            this._bm = ObjCreate.createGBitmap("", 4, 1, this);
            this._bm.width = 20;
            this._bm.height = 20;
            this._attriTx = ObjCreate.createGTextField("", 28, 3, 160, 20, this);
            return;
        }

        public updateInfo(arg1: Object): void
        {
            var loc1=GameDefConfig.instance.getEJewel(arg1.attri).text1;
            this._attriTx.htmlText = Language.getStringByParam(74614, arg1.lv, loc1, " " + loc1 + "+" + arg1.value);
            LoaderManager.instance.load(arg1.jpgName, this.onLoadCompleteHandler);
            return;
        }

        /* internal  */onLoadCompleteHandler(arg1: ImageInfo): void
        {
            this._bm.bitmapData = arg1.bitmapData;
            this._bm.width = 20;
            this._bm.height = 20;
            return;
        }

        /* internal */ /* var */_bm: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_attriTx: Object /* flash.text.TextField */;
    }
